<template>
    <div>
      {{title}}
    </div>
</template>
<script>
export default {
  name: 'mixins',
  data () {
    return {
      title: 'vue  混入',
      mixone: {
      }
    }
  },
  methods: {
  },
  watch: {
    counter (curVal, oldVal) {
      console.log(curVal, oldVal)
    },
    kilometers (val) {
      this.kilometers = val
      this.meters = val * 1000
    },
    meters (val) {
      this.kilometers = val / 1000
      this.meters = val
    }
  },
  mixins: {
    'myMixins': {
      created () {
        alert('ddddd')
        this.startmixin()
      },
      methods: {
        startmixin: function () {
          console.log('this is mixins')
          document.write('欢迎来到混入实例')
        }
      }
    }
  }
}
</script>
